$(document).ready(function () {
	/*//Login Form
	$("#sign-in > a").click(function () {
		$("#site-nav-signin").addClass("show");
		$("#site-nav-signin").fadeIn(100);
		$(document).bind("click", function (event) {
			//Check select city
		    if ( !$(event.target).parent().hasClass('userLogin') && !$(event.target).parents().hasClass('loginPopup')) {
		    	$(".loginPopup").fadeOut(100);
		    	$(document).unbind("click");
		    }
		});
		
		$(".loginPopup input[name=email], .loginPopup input[name=password]").focus(function () {
			$(this).parent().removeClass("error");
			$(this).parent().find(".triangleUp").fadeOut(100);
			$(this).parent().find(".errorMessage").fadeOut(100);
		});
		
		$(".loginPopup button").bind("click", function (event) {
			var email = $(".loginPopup input[name=email]");
			var password = $(".loginPopup input[name=password]");
			
			var pattern = /^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_.-])+\.([a-zA-Z])+([a-zA-Z])+/;
			if (email.val() == "" || !pattern.test(email.val())) {
				email.parent().addClass("error");
				email.parent().find(".triangleUp").fadeIn(100);
				email.parent().find(".errorMessage").fadeIn(100);
			}
			
			if (password.val() == "") {
				password.parent().addClass("error");
				password.parent().find(".triangleUp").fadeIn(100);
				password.parent().find(".errorMessage").fadeIn(100);
			}
			
			//check username
			if ($(".loginPopup label.error").length == 0) {
				var form_data = {email: email.val(), password: password.val()};
				$.ajax({
					type: "GET",
					url: "/ajax-login",
					data: form_data,
					dataType: "json",
					success: function(response)
					{
						//check is success
						if (response.success == false) {
							if (response.email) {
								email.parent().addClass("error");
								email.parent().find(".triangleUp").fadeIn(100);
								email.parent().find(".errorMessage").html(response.email).fadeIn(100);
							}
							if (response.password) {
								password.parent().addClass("error");
								password.parent().find(".triangleUp").fadeIn(100);
								password.parent().find(".errorMessage").html(response.password).fadeIn(100);
							}
						} else {
							location.reload();
						}
					}
				});
			}
			
			return false;
		});
	});*/
});